// import { Plugin } from "vite"; (Plugin | Plugin[])[]
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import eslintPlugin from 'vite-plugin-eslint'
import DefineOptions from 'unplugin-vue-define-options/vite';
// import checker from 'vite-plugin-checker'
import createMockPlugin from "./mock"; // mock 数据插件
import configVisualizerConfig from "./visualizer"; // 包体积分析插件
import configSvgIconsPlugin from "./svgIcons";
import configCompnent from "./component"; // 自动导入组件
import qiankun from "vite-plugin-qiankun"; // 引入乾坤
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'

export default function createVitePlugin() {
  const vitePlugins = [
    vue(),
    DefineOptions(),
    vueJsx(),
    eslintPlugin({}),
    // checker({typescript:true}),
    createMockPlugin(),
    configVisualizerConfig(),
    configSvgIconsPlugin(),
    configCompnent(),
    VueI18nPlugin({}),
    qiankun("micro-loong3-vue", {
      useDevMode: true,
    })
  ]
  return vitePlugins;
}
